<template>
  <div class="rqcode-box">
    <div class="recode-left">
      <h1>快捷入口</h1>
      <div class="item-box" v-for="item in list" :key="item.id">
        <img :src="item.rqcode" alt style="background: white;cursor: pointer" @click="toyuyue(item.id);"/>
        <h2>{{item.name}}</h2>
      </div>
    </div>
  </div>
</template>
<script>
import router from '../../router/index'
export default {
  data() {
    return {
      hover: false,
      list: [],
    };
  },
  computed: {
    baseUrl() {
      return this.$store.state.fileIp;
    },
  },
  created() {
    this.getcode();
  },
  methods: {
    getcode() {

      this.list[0]={
        id:'1',
        rqcode:require("../../assets/image/wxsyy.jpg"),
        name:'管理后台'
      }
      this.list[1]={
        id:'2',
        rqcode:require("../../assets/image/login.jpg"),
        name:'登录门户'
      }
    },
    toyuyue(id){
      if(id==2){
        router.push({
          path:'/login'
        })
      }else{
        // window.location.href = 'https://www.baidu.com'
        window.open('http://10.225.60.63:8081','_blank')
      }
      // this.$msgbox.alert(id);
    }
  },
};
</script>
<style lang="less" scoped>
.rqcode-box {
//   min-width: 168px;
  position: fixed;
  right: 2vh;
  bottom: 30vh;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;

  .recode-left {
    padding: 25px 16px 23px 16px;
    background: #2a5caa;
    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin-right: 12px;
    h1 {
      font-size: 16px;
      font-weight: 600;
      color: #ffffff;
      line-height: 28px;
      text-align: center;
    }
    .item-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 12px 0 0 0;
      h2 {
        font-size: 13px;
        font-weight: 500;
        color: #fff;
        line-height: 25px;
      }
      img {
        width: 60px;
        height: 60px;
      }
    }
  }
  .recode-right {
    width: 80px;
    height: 80px;
    background: #009ad6;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 10%;
    //img {
    //  width: 100%;
    //  height: 100%;
    //}
  }
}
</style>
